#include <stdio.h>
int work1()
{
    int ret = 0;
    while (ret < 10000000)
        ret += 1;
    return ret;
}
int work2()
{
    int ret = 0;
    while (ret < 10000000)
        ret += 1;
    return ret;
}
int work3()
{
    return work1();
}
int main(void)
{
    int ret = 0;
    ret += work1(); // 实际 work1 调用了2次 (被work3调用一次)
    ret += work2(); // 实际 work2 调用了1次
    ret += work3(); // 实际 work3 调用了1次
    printf("ret = %d \r\n", ret); // 打印一下,防止过程被优化
    return 0;
}
